package cn.itsource.basic.util;

import lombok.Data;


public class AjaxResult {
    /*表示请求成功还是失败*/
    private Boolean success = true;

    private String message = "操作成功";

    private Object resultObj; //封装额外的数据

    public Boolean getSuccess() {
        return success;
    }


    public static AjaxResult me(){
        return new AjaxResult();
    }

    /*
    * 调用了设置值以后  把当前对象返回回去 链式编程
    * */
    public AjaxResult setSuccess(Boolean success) {
        this.success = success;
        return this;
    }

    public String getMessage() {
        return message;
    }

    public AjaxResult setMessage(String message) {
        this.message = message;
        return this;
    }

    public Object getResultObj() {
        return resultObj;
    }

    public AjaxResult setResultObj(Object resultObj) {
        this.resultObj = resultObj;
        return this;
    }
}
